<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Task6</title>
  <script>
    if ('0') {
      alert('Hello!');
    }
  </script>
  <script>
    'use strict';
    let answer1 = prompt('What is the “official” name of JavaScript?', '')
    if (answer1 === 'ECMAScript') {
      alert('Right!')
    } else {
      alert('You don\'t know? ECMAScript!')
    }
  </script>

  <script>
    let answer2 = prompt("Type a number", '0');
    if (answer2 > 0) {
      alert(1)
    } else if (answer2 < 0) {
      alert(-1)
    } else {
      alert(0)
    }
  </script>
  <script>
    let result;
    let a = 1, b = 10;

    // if (a + b < 4) {
    //   result = 'Below';
    // } else {
    //   result = 'Over';
    // }

    result = a + b < 4 ? 'Below' : 'Over';
    console.log(result); // 'Over'

    let message;
    let login = 'Director';

    // if (login == 'Employee') {
    //   message = 'Hello';
    // } else if (login == 'Director') {
    //   message = 'Greetings';
    // } else if (login == '') {
    //   message = 'No login';
    // } else {
    //   message = '';
    // }
    message = login == 'Employee' ? 'Hello'
      : login == 'Director' ? 'Greetings'
        : login == '' ? 'No login' : '';

    console.log(message);// 'Greetings'

  </script>
</head>
<body>

</body>
</html>